home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / FPGAWKII.ZIP / JTAG.H < prev    next >
C/C++ Source or Header  |  1995-04-10  |  2KB  |  63 lines

  1. #ifndef JTAG_H
  2. #define JTAG_H
  3. #include <malloc.h>
  4.  
  5. /* common macros */
  6. #define MALLOC(n)        malloc((unsigned)(n))
  7. #define NEWV(type,n)     (type*)MALLOC((n)*sizeof(type))
  8. #define FREE(p)          free((char*)p)
  9.  
  10. /* bitstream stuff */
  11. typedef unsigned long bitstream;
  12.  
  13. bitstream *AllocBits( int NumBits );
  14. void FreeBits( bitstream *bits );
  15. unsigned int GetBit( bitstream *bits, int i );
  16. void SetBit( bitstream *bits, int i, int val );
  17. void CmpBits( int length, bitstream *b1, bitstream *b2,
  18.           bitstream *mask, bitstream *result );
  19. void PrintBits( bitstream *bits, int length );
  20. void SelectPort( int PortNum );
  21. void PortWait( void );
  22. void SetPortDelay( int delay );
  23. void OutToPort( int val );
  24. int GetOutPortValue( void );
  25. int InFromPort( void );
  26. void SetPortBit( int bit, int val );
  27. unsigned int GetPortBit( int bit );
  28. void SetTMSValue( int val );
  29. unsigned int GetTMSValue( void );
  30. void SetTDOValue( int val );
  31. unsigned int GetTDOValue( void );
  32. unsigned int GetTDIValue( void );
  33. unsigned int GetTCKValue( void );
  34. void SetTCKValue( int val );
  35. JTAGTraceOnOff( int OnOff );
  36. void PulseTCK( void );
  37. void JTAGPortInit( void );
  38. void HardTAPReset( void );
  39. void UpdateTAPState( void );
  40. char *GetTAPStateText( void );
  41. unsigned int SendRcvBit( unsigned SendBit );
  42. void SendRcvBitstream( int length, bitstream *SendBits, bitstream *RcvBits );
  43. void LoadBSIRthenBSDR( int BSIRLength, bitstream *instruction,
  44.                int BSDRLength, bitstream *send, bitstream *recv );
  45. void EPX780IDCode( bitstream *DeviceIDCode );
  46. void EPX780UES( bitstream *UESig );
  47. void EPX780SamplePreload( bitstream *send, bitstream *recv );
  48. void EPX780Extest( bitstream *send, bitstream *recv );
  49. void EPX780HighZ(void);
  50. void EPX780Bypass(void);
  51. void SetMacrocellDirection( bitstream *bsdr, int macrocell, int dir );
  52. int GetMacrocellDirection( bitstream *bsdr, int macrocell );
  53. void SetMacrocellOutput( bitstream *bsdr, int macrocell, int value );
  54. int GetMacrocellOutput( bitstream *bsdr, int macrocell );
  55. void SetMacrocellInput( bitstream *bsdr, int macrocell, int value );
  56. int GetMacrocellInput( bitstream *bsdr, int macrocell );
  57. void SetSyncCLOCK( bitstream *bsdr, int clock, int value );
  58. int GetSyncClock( bitstream *bsdr, int clock );
  59. void SetDedicatedInput( bitstream *bsdr, int input, int value );
  60. int GetDedicatedInput( bitstream *bsdr, int input );
  61.  
  62. #endif
  63.